using System;
namespace Velocity4Net.Util.Introspection
{

    /**
     *  Method used for regular method invocation
     *
     *    $foo.bar()
     *
     *
     * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
     * @version $Id: VelMethod.java 510625 2007-02-22 19:06:28Z nbubna $
     */
    public interface VelMethod
    {
        /**
         *  invocation method - called when the method invocation should be
         *  performed and a value returned
         * @param o
         * @param params
         * @return The resulting object.
         * @throws Exception
         */
         Object invoke(Object o, Object[] args);

        /**
         *  specifies if this VelMethod is cacheable and able to be
         *  reused for this class of object it was returned for
         *
         *  @return true if can be reused for this class, false if not
         */
         bool isCacheable();

        /**
         *  returns the method name used
         * @return The method name used
         */
         String getMethodName();

        /**
         *  returns the return type of the method invoked
         * @return The return type of the method invoked
         */
         Type getReturnType();
    }
}